﻿@section HeaderSection
   {
    <link href="../Content/Styles/create_poll_page.css" rel="stylesheet" type="text/css" />
   }
   
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script>
@model RipPoll.Library.PollPE
 
 <script type="text/javascript">
     $(document).ready(function () {
         $('a[id=gonext]').click(function () {
             $('form#create2Form').submit();
             return false;
         });

         $('input[type=text]').focus(function () {
             var val = $(this).val();
             if (val == "enter first name" || val == "enter last name"
                || val == "enter city" || val == "enter state") {
                 $(this).val('')
             }
         });

         $('input[type=text]').focusout(function () {
             var val = $(this).val();
             if (val == "") {
                 if ($(this).attr("id") == 'firstname')
                     $(this).val('enter first name');
                 else if ($(this).attr("id") == 'lastname')
                     $(this).val('enter last name');
                 else if ($(this).attr("id") == 'city')
                     $(this).val('enter city');
                 else if ($(this).attr("id") == 'state')
                     $(this).val('enter state');
             }
         });

         $('textarea[id="question"]').focus(function () {
             var val = $(this).val();
             if ($.trim(val) == "Type in your question here. 150 characters max.") {
                 $(this).val('')
             }
         });

         $('textarea[id="question"]').focusout(function () {
             var val = $(this).val();
             if (val == "") {
                 $(this).val('Type in your question here. 150 characters max.');
             }
         });


     });
 </script>
@{  
    ViewBag.Title = "   Create Poll";
    ViewBag.PageDivId = "headerCreatePoll2";
    ViewBag.Margin = "";
} 
 
 <form id="create2Form" action="create2" method="post">
  
  <div id="stepBoxMain">
 <img src="../content/images/rippoll_icon_black.jpg" width="56" height="51" align="middle" /><span class="topText"> You're on your way to making a
  rippoll that just might bring about a change in today's society.</span> <br />
</div>

<div id="createPageLeft">

<div class="stepBoxText" id="stepBox">
  <a href="/rippollwebmvc/poll/create1">1. Pick a category</a></div>

<div class="stepBoxText" id="stepBox1">
2. Create your question</div>

@if (Model != null && (Model.ChoiceGroupId > 0 || Model.Choices != null))
{
<div class="stepBoxText" id="stepBox">
<a href="../Poll/create3">3. Choose your format</a>
</div>
}
else
{
    <div class="stepBoxText" id="stepBox">
    3. Choose your format</div>
}
@if (Model != null && Model.Choices != null)
{
<div class="stepBoxText" id="stepBox">
<a href="../Poll/create4">4. Enhance your rippoll</a></div>
}
else
{
<div class="stepBoxText" id="stepBox">
4. Enhance your rippoll</div>
}

Click one of the above to go back and edit a previous step</div>



<div id="createPageRight">
 <img src="../content/images/what_to_ask.jpg" width="377" height="42" />
 
 <div id="inputBox">
<label>
  <textarea name="question" cols="45" id="question" rows="2">@ViewBag.PollText
  </textarea>
  <span class="charactersLeft">150 characters left</span><br />
<br />
</label>
Profanity, racial slurs and derogatory remarks will not be allowed. Please keep it clean. <span class="redText"><a href="#">(requirements)</a><br />
     <br />
     </span>Created by: <span class="redText">
     @if (ViewBag.FirstName != null && !string.IsNullOrEmpty(ViewBag.FirstName)){
     <label>
       <input name="firstname" type="text" id="firstname" value="@ViewBag.FirstName" size="10" disabled="disabled" />
     </label>
         }
         else
         {
         <label>
       <input name="firstname" type="text" id="firstname" value="enter first name" size="10" />
     </label>
         }
         @if (ViewBag.LastName != null && !string.IsNullOrEmpty(ViewBag.LastName))
         {
      <label>
        <input name="lastname" type="text" id="lastname" value="@ViewBag.LastName" size="20"  disabled="disabled" />
      </label>
        }
        else
        {
        <label>
            <input name="lastname" type="text" id="lastname" value="enter last name" size="20" />
        </label>
        }
        @if (ViewBag.UserCity != null && !string.IsNullOrEmpty(ViewBag.UserCity))
         {
              <label>
                <input name="city" type="text" id="city" value="@ViewBag.UserCity" size="20"  disabled="disabled" />
              </label>
                    }
            else
            {
              <label>
                <input name="city" type="text" id="city" value="enter city" size="20" />
              </label>      
            }
            @if (ViewBag.UserCity != null && !string.IsNullOrEmpty(ViewBag.State))
            {
      <input name="state" type="text" id="state" value="@ViewBag.State" size="10" disabled="disabled" />
                }
                else{
                <input name="state" type="text" id="state" value="enter state" size="10" />
                }
      </span><span class="verySmallText"><br />
      not required but highly recommended</span><span class="redText"> <a href="#">(see why)</a><br />
       </span><br />
       <a id="gonext"><img src="../content/images/go_to_step_3.jpg" alt="Click here to go to Step 2" width="200" height="28" border="0" /></a></div>
 <br />
 <span class="viewCategory"><br />
 <br />
 <br />
 <br />
 <strong>Learn how to make your rippoll look great.</strong></span> <br />
Read our <span class="blueHiliteText"><a href="#">recommended settings</a>.</span><br />
     <br />
     <span class="viewCategory"><strong>Still have questions?</strong></span> <span class="blueHiliteText"><a href="#">Watch this tutorial</a></span> or <span class="blueHiliteText"><a href="#">ask for help</a></span>.</div>

  <div id="stepBoxMain">
    <span class="regularText">All polls submitted will be reviewed by our internal audit dept. to make sure they’re not slanderous, malicious, derogatory and basically in poor taste.  Keep it clean.  We want our polls to be taken seriously, since they may deal with local, state, national and worldwide issues.  We strive very hard to make sure that this is a positive experience for those submitting polls and those viewing  and responding to your polls.</span>
</div>

</form>